﻿using UnityEngine;
using System.Collections;

public class ScoreManager : MonoBehaviour {
	
	//SCORE
	public int		p1Score = 0;
	public int		p2Score = 0;
	public int		p3Score = 0;
	public int		p4Score = 0;
	
	//POINTS
	public int					eatAllCakeScore = 3;
	public int					shareCakeScore = 2;
	public int 					eatPoisonScore = -2;
	
	
	void Start () 
	{
		
	}
	
	
	void Update () 
	{
		
	}
	
	
	public void EatPoison (int player)
	{
		if (player == 1) 
		{
			p1Score -= eatPoisonScore;
		}
		
		if (player == 2) 
		{
			p2Score -= eatPoisonScore;
		}
		
		if (player == 3) 
		{
			p3Score -= eatPoisonScore;
		}
		
		if (player == 4) 
		{
			p4Score -= eatPoisonScore;
		}
	}
	
	public void EatAllCake(int player)
	{
		if (player == 1) 
		{
			p1Score += eatAllCakeScore;
		}
		
		if (player == 2) 
		{
			p2Score += eatAllCakeScore;
		}
		
		if (player == 3) 
		{
			p3Score += eatAllCakeScore;
		}
		
		if (player == 4) 
		{
			p4Score += eatAllCakeScore;
		}
	}
	
	public void ShareCake()
	{
		p1Score += shareCakeScore;
		p2Score += shareCakeScore;
		p3Score += shareCakeScore;
		p4Score += shareCakeScore;
	}
	
}
